<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ tag body-content="empty" %>
<%@ attribute name="title" required="true"%> 

<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>${title}</title>
		<style type="text/css">
		*{margin:0;font-family: Calibri,Arial,Helvetica, sans-serif;}
		
		.nav{border-bottom:1px solid black;padding:0 0 3px 10px;margin: 0 0 10px 0;}
		.nav ul{height: 38px;list-style-type: none;margin: 0;padding:0;}
		.nav li{float:left;margin: 5px 14px 3px 0;}
		.nav li a{display:block;background: black;color: #e0e0e0;text-decoration:none;padding:4px 6px 4px 6px;font-weight: bold;}
		.nav li a:hover{color: white;}
		
		.content{padding:5px 10px 5px 10px;}
		
		table{margin: 10px 0 20px 0;}
		td{background: #E8E8E8;padding: 3px;}
		th{background: #9ACDED;padding: 4px 7px 4px 7px;text-align:center;}
		input[type=submit]{padding:3px 8px 3px 8px;font-size:1.1em;}
		
		fieldset{margin-bottom:10px;}
		fieldset input{margin-bottom:8px;}
		</style>
	</head>	
	<body>	
		<div class="nav">
		<ul>
			<li><a href="register">Register</a></li>
			<li><a href="login">Log in</a></li>
			<li><a href="service">Products list</a></li>
			<li><a href="admin">Admin</a></li>
		</ul>

	
		<c:choose>
			<c:when test="${sessionScope.currentUser != null}">
				Welcome ${sessionScope.currentUser.username}<br />
			 	<a href="profile">Profile</a> |
				<a href="login?logoff=true">Disconnect</a>
			</c:when>
			<c:otherwise>You are not logged in</c:otherwise>
		</c:choose>
	</div>
	
	<div class="content">